<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>技术小馆 - Java与AI技术知识库</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        
        .section-divider {
            height: 2px;
            background: linear-gradient(to right, transparent, #667eea, transparent);
            margin: 3rem 0;
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            padding: 1.5rem;
            border-radius: 0.5rem;
            overflow-x: auto;
            font-family: 'Consolas', 'Monaco', monospace;
        }
        
        .step-number {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            flex-shrink: 0;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6 text-center">
            <h1 class="text-5xl md:text-6xl font-bold mb-4">技术小馆</h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90">Java与AI技术知识库</p>
            <div class="flex justify-center space-x-4">
                <a href="https://www.tostring.site/" class="bg-white text-purple-700 px-6 py-3 rounded-full font-semibold hover:bg-gray-100 transition">
                    <i class="fas fa-globe mr-2"></i>访问官网
                </a>
                <a href="#lmarena-bridge" class="border-2 border-white text-white px-6 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-700 transition">
                    <i class="fas fa-rocket mr-2"></i>开始探索
                </a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto px-6 py-12">
        <!-- LMArenaBridge Introduction -->
        <section id="lmarena-bridge" class="bg-white rounded-2xl shadow-xl p-8 mb-12 card-hover">
            <h2 class="text-3xl font-bold mb-6 text-gradient">LMArenaBridge 介绍</h2>
            <p class="text-lg leading-relaxed text-gray-700">
                <span class="drop-cap">L</span>MArenaBridge 是一个基于 FastAPI 和 WebSocket 的高性能工具集，它能让你通过任何兼容 OpenAI API 的客户端或应用程序，无缝使用 <a href="https://lmarena.ai/" class="text-blue-600 hover:underline font-semibold">LMArena.ai</a> 平台上提供的海量大语言模型。
            </p>
            
            <!-- Architecture Diagram -->
            <div class="mt-8">
                <div class="mermaid">
                    graph LR
                        A[AI客户端] -->|OpenAI API| B[LMArenaBridge]
                        B -->|WebSocket| C[油猴脚本]
                        C -->|浏览器| D[LMArena.ai]
                        D -->|大语言模型| E[Claude/GPT/等]
                        style A fill:#667eea,stroke:#fff,color:#fff
                        style B fill:#764ba2,stroke:#fff,color:#fff
                        style C fill:#9f7aea,stroke:#fff,color:#fff
                        style D fill:#b794f4,stroke:#fff,color:#fff
                        style E fill:#d6bcfa,stroke:#333,color:#333
                </div>
            </div>
        </section>

        <!-- Download Section -->
        <section class="bg-gradient-to-r from-purple-50 to-pink-50 rounded-2xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-6 flex items-center">
                <i class="fas fa-download mr-3 text-purple-600"></i>
                下载项目
            </h2>
            <div class="code-block">
                <p>链接: https://pan.baidu.com/s/16lXXX2G7KKZeSn4Y_e1d8g?pwd=ntam 提取码: ntam</p>
            </div>
            <p class="mt-4 text-gray-700">
                <i class="fas fa-info-circle mr-2 text-blue-600"></i>
                运行该项目需要准备好 Python 环境和一款支持油猴脚本的浏览器 (如 Chrome, Firefox, Edge)。
            </p>
        </section>

        <!-- Installation Guide -->
        <section class="bg-white rounded-2xl shadow-xl p-8 mb-12">
            <h2 class="text-3xl font-bold mb-8 text-gradient">安装 LMArenaBridge</h2>
            
            <!-- Step 1 -->
            <div class="mb-10">
                <h3 class="text-2xl font-semibold mb-6 flex items-center">
                    <span class="step-number mr-4">1</span>
                    准备工作
                </h3>
                
                <div class="ml-14 space-y-6">
                    <div class="bg-gray-50 rounded-lg p-6">
                        <h4 class="font-semibold text-lg mb-3">
                            <i class="fas fa-puzzle-piece mr-2 text-purple-600"></i>
                            安装油猴脚本管理器
                        </h4>
                        <p class="text-gray-700 mb-4">
                            为你的浏览器安装 <a href="https://www.tampermonkey.net/" class="text-blue-600 hover:underline font-semibold">Tampermonkey</a> 扩展。
                        </p>
                        <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758013654833-a56e69c5-7188-4cf2-b562-9124bd78e29d.png" alt="Tampermonkey" class="rounded-lg shadow-md w-full max-w-2xl">
                    </div>
                    
                    <div class="bg-gray-50 rounded-lg p-6">
                        <h4 class="font-semibold text-lg mb-3">
                            <i class="fas fa-code mr-2 text-purple-600"></i>
                            安装本项目油猴脚本
                        </h4>
                        
                        <ol class="space-y-4">
                            <li class="flex">
                                <span class="text-purple-600 font-bold mr-3">1.</span>
                                <div>
                                    <p class="text-gray-700 mb-3">打开 Tampermonkey 扩展的管理面板。</p>
                                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758894005935-605a9cb1-74ea-4263-9897-cdc7bf11a13f.png" alt="管理面板" class="rounded-lg shadow-md">
                                </div>
                            </li>
                            
                            <li class="flex mt-6">
                                <span class="text-purple-600 font-bold mr-3">2.</span>
                                <div>
                                    <p class="text-gray-700 mb-3">点击"添加新脚本"或"Create a new script"。</p>
                                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758894064033-2c3f69fa-b445-439a-b00d-d99b7fa1c872.png" alt="添加脚本" class="rounded-lg shadow-md">
                                </div>
                            </li>
                            
                            <li class="flex mt-6">
                                <span class="text-purple-600 font-bold mr-3">3.</span>
                                <div>
                                    <p class="text-gray-700 mb-3">将 TampermonkeyScript/LMArenaApiBridge.js 文件中的所有代码复制并粘贴到编辑器中。</p>
                                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758894220861-d234f4fb-a7d9-41a9-961f-910e7fa89f8c.png" alt="粘贴代码" class="rounded-lg shadow-md">
                                </div>
                            </li>
                            
                            <li class="flex mt-6">
                                <span class="text-purple-600 font-bold mr-3">4.</span>
                                <div>
                                    <p class="text-gray-700 mb-3">保存脚本。</p>
                                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758894167147-59fd0a97-632d-46ed-a5c4-929e1ce28c09.png" alt="保存脚本" class="rounded-lg shadow-md">
                                </div>
                            </li>
                        </ol>
                    </div>
                </div>
            </div>
            
            <div class="section-divider"></div>
            
            <!-- Step 2 -->
            <div class="mb-10">
                <h3 class="text-2xl font-semibold mb-6 flex items-center">
                    <span class="step-number mr-4">2</span>
                    运行主程序
                </h3>
                
                <div class="ml-14">
                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6">
                        <p class="text-yellow-800">
                            <i class="fas fa-exclamation-triangle mr-2"></i>
                            运行程序之前浏览器先开启 https://lmarena.ai/ 页面，并且进入 Direct Chat 选择模型后和他对话一次。
                        </p>
                    </div>
                    
                    <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758351472882-d59c42f8-b182-4477-89d6-255528e0452d.png" alt="LMArena页面" class="rounded-lg shadow-md mb-6">
                    
                    <div class="bg-gray-50 rounded-lg p-6">
                        <h4 class="font-semibold text-lg mb-3">
                            <i class="fas fa-terminal mr-2 text-purple-600"></i>
                            启动本地服务器
                        </h4>
                        <p class="text-gray-700 mb-4">在项目根目录下，运行主服务程序。然后点击启动。</p>
                        
                        <div class="code-block mb-4">
                            LMArenaBridge.exe
                        </div>
                        
                        <div class="bg-red-50 border-l-4 border-red-400 p-4 mb-6">
                            <p class="text-red-800 font-semibold">
                                <i class="fas fa-key mr-2"></i>
                                授权码请联系作者 v：tostring1
                            </p>
                        </div>
                        
                        <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758351105322-dfb8454e-3255-42b0-8cdc-4ac8d325360e.png" alt="启动程序" class="rounded-lg shadow-md mb-4">
                        
                        <p class="text-gray-700 mb-4">
                            点击启动后，看到<span class="font-semibold text-green-600">油猴脚本已成功连接 WebSocket</span>，表示服务器已准备<span class="font-semibold">就绪</span>。
                        </p>
                        
                        <img src="https://cdn.nlark.com/yuque/0/2025/png/21449790/1758351181663-6bc2d7f1-a741-4bfb-8526-d7e351da88cd.png" alt="连接成功" class="rounded-lg shadow-md mb-4">
                        
                        <div class="